﻿using System;

namespace Wisdom.Core
{
    /// <summary>
    /// 描述：配置基类 ,通过指定类型配置配置容器
    /// </summary>
    public abstract class TypeSpecifiedConfigSourceConfigurator : ConfigSourceConfigurator
    {
        #region Private Fields
        private readonly Type type;
        #endregion

        #region Ctor
        /// <summary>
        /// 初始化 <c>TypeSpecifiedConfigSourceConfigurator</c> 类.
        /// </summary>
        /// <param name="context">配置上下文.</param>
        /// <param name="type">必须的配置类型.</param>
        protected TypeSpecifiedConfigSourceConfigurator(IConfigSourceConfigurator context, Type type)
            : base(context)
        {
            this.type = type;
        }
        #endregion

        #region Protected Properties
        /// <summary>
        /// 获取必须的配置类型
        /// </summary>
        protected Type Type
        {
            get { return type; }
        }
        #endregion
    }
}